using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Bingo.Helper
{
    public static class SpriteHelper
    {
        public static Sprite GetSprite(string bundleName, string spriteName, float pixel = 50)
        {
            //#if UNITY_EDITOR
            Texture2D texture = Facades.Resources.LoadSync<Texture2D>(bundleName, spriteName);
            Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height),
                new Vector2(0.5f, 0.5f), pixel);
            /*#else
            Sprite sprite  = Facades.Resources.LoadSync<Sprite>(bundleName, spriteName);
            #endif*/
            return sprite;
        }
    }
}